#!/bin/bash

PYTHON_VER=$(python -c "from sys import version; print (version[:3])")
PYTHON_INC=$(python -c "from distutils.sysconfig import get_python_inc; print get_python_inc()")

pushd pm_python/pyportmidi

${CC} ${CFLAGS} -pthread -fPIC -c -o _pyportmidi.o -I../../pm_common -I../../porttime -I$PYTHON_INC _pyportmidi.c
${CC} -shared -o _pyportmidi.so _pyportmidi.o -lportmidi -lpython$PYTHON_VER -L../../build/Release
popd
